useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() +  'protoSales11.bin')
		select('ComboBox1', 'Compiled Proto')
		select('FileChooser1', commonBits.stdCopybookDir() + 'Sales11.protocomp')
		select('ComboBox1', 'Compiled Proto')
		click('Edit1')
		select('Table', 'cell:2|store,0(20)')
		rightclick('Table', '5|quantity,3')
##		select('Table', 'cell:2|store,0(20)')
		select_menu('Edit Record')
##		select('Table1', 'cell:2|store,0(20)')
		select('Table', 'RETURN', 'Data,8')
		select('Table', 'cell:Text,9(DEBIT_CARD)')
		assert_p('Table', 'Content', '[[keycode, 1, , 69694158, 69694158], [store, 2, , 20, 20], [department, 3, , 280, 280], [saleDate, 4, , 40118, 40118], [quantity, 5, , 1, 1], [price, 6, , 19000, 19000], [priceFloat, 7, , 19.0, 19.0], [priceDouble, 8, , 19.0, 19.0], [saleType, 9, , RETURN, RETURN], [paymentType, 10, , DEBIT_CARD, DEBIT_CARD], [strArray, 11, , [\'\',\' 0\',\' 0 1\',\' 0 1 2\'], [\'\',\' 0\',\' 0 1\',\' 0 1 2\']]]')
		select('Table', 'cell:Text,9(DEBIT_CARD)')
		select_menu('Window>>protoSales11.bin>>Table:')
##		select('Table2', 'cell:Text,9(DEBIT_CARD)')
		select('Table', 'cell:2|store,0(20)')
		select('Table', 'cell:2|store,0(20)')
		assert_p('Table', 'Text', 'RETURN', '9|saleType,3')
		select('Table', 'cell:2|store,0(20)')
		assert_p('Table', 'Text', 'cell:2|store,0(20)')
		select('Table', 'cell:2|store,0(20)')
		assert_p('Table', 'Text', 'cell:2|store,0(20)')
		select('Table', '', '10|paymentType,3')
		select('Table', 'cell:10|paymentType,3(DEBIT_CARD)')
##		assert_p('Table', 'Text', 'cell:10|paymentType,3(DEBIT_CARD)')
		select_menu('Window>>protoSales11.bin>>Record:')
		assert_p('Table', 'Content', '[[keycode, 1, , 69694158, 69694158], [store, 2, , 20, 20], [department, 3, , 280, 280], [saleDate, 4, , 40118, 40118], [quantity, 5, , 1, 1], [price, 6, , 19000, 19000], [priceFloat, 7, , 19.0, 19.0], [priceDouble, 8, , 19.0, 19.0], [saleType, 9, , RETURN, RETURN], [paymentType, 10, , , ], [strArray, 11, , [\'\',\' 0\',\' 0 1\',\' 0 1 2\'], [\'\',\' 0\',\' 0 1\',\' 0 1 2\']]]')
		select('Table', 'CREDIT_CARD', 'Data,9')
		select('Table', 'cell:Data,6(19.0)')
		assert_p('Table', 'Content', '[[keycode, 1, , 69694158, 69694158], [store, 2, , 20, 20], [department, 3, , 280, 280], [saleDate, 4, , 40118, 40118], [quantity, 5, , 1, 1], [price, 6, , 19000, 19000], [priceFloat, 7, , 19.0, 19.0], [priceDouble, 8, , 19.0, 19.0], [saleType, 9, , RETURN, RETURN], [paymentType, 10, , CREDIT_CARD, CREDIT_CARD], [strArray, 11, , [\'\',\' 0\',\' 0 1\',\' 0 1 2\'], [\'\',\' 0\',\' 0 1\',\' 0 1 2\']]]')
		select_menu('Window>>protoSales11.bin>>Table:')
		assert_p('Table', 'Text', 'cell:10|paymentType,3(CREDIT_CARD)')
		select('Table', 'cell:10|paymentType,3(CREDIT_CARD)')
		select('Table', 'CASH', '10|paymentType,3')
		select('Table', 'cell:10|paymentType,3(CREDIT_CARD)')
		assert_p('Table', 'Text', 'CASH', '10|paymentType,3')
		select_menu('Window>>protoSales11.bin>>Record:')
		assert_p('Table', 'Content', '[[keycode, 1, , 69694158, 69694158], [store, 2, , 20, 20], [department, 3, , 280, 280], [saleDate, 4, , 40118, 40118], [quantity, 5, , 1, 1], [price, 6, , 19000, 19000], [priceFloat, 7, , 19.0, 19.0], [priceDouble, 8, , 19.0, 19.0], [saleType, 9, , RETURN, RETURN], [paymentType, 10, , CASH, CASH], [strArray, 11, , [\'\',\' 0\',\' 0 1\',\' 0 1 2\'], [\'\',\' 0\',\' 0 1\',\' 0 1 2\']]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')

##		if window('Save Changes to file: ' + commonBits.sampleDir() + 'protosales11.bin'):
##			click('No')
##		close()
	close()
